home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_comfalls.cog < prev    next >
Text File  |  1999-11-15  |  23KB  |  769 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_ComFalls.cog
  4. #
  5. # Set the levers in the correct sequence to get rid of the minecar commies.
  6. # Also allows the player access to Gem2. 
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message     startup
  16.     message     user0
  17.     message     user1
  18.     message     user2
  19.     message     entered
  20.     message     activated
  21.     message     timer
  22.     
  23.     thing       player          local
  24.     thing       bombPos         local
  25.     thing       comCar          local
  26.     thing       indy1           local
  27.     thing       indy2           
  28.     thing       pushed          local
  29.     thing       ghostCar
  30.     thing       aframe0
  31.     thing       aframe1
  32.     thing       comCam1
  33.     thing       comCam2
  34.     thing       comCam3
  35.     thing       comCam4
  36.     thing       comCam5
  37.     thing       comCam6
  38.     thing       ghostExp
  39.     thing       ctrlCam1        # look at ctrl panel
  40.     thing       target1
  41.     thing       leverGhost
  42.     thing       indyCam1        # indy walks back to lever5
  43.     thing       indyCam2        # pull lever5
  44.     thing       indyCam3        # pull lever5 different angle
  45.     thing       panelTarget
  46.     thing       switchCam
  47.     thing       trkSwitch5
  48.     thing       trkSwitch4
  49.     thing       ghost_Focus
  50.     thing       offsetCam       # control room offsetCam
  51.     thing       cam_Barricade   # barricade cam
  52.     thing       cam_FrontShot   # front shot of commies entering switch4
  53.     
  54.     surface     trig1           mask=0x004
  55.     surface     trig2           mask=0x004
  56.     surface     trig3           mask=0x004
  57.     surface     trig4           mask=0x004
  58.     surface     trig5           mask=0x004
  59.     surface     trig6           mask=0x004
  60.     surface     aframeTrig      mask=0x004
  61.     surface     breakTrig       mask=0x004
  62.     surface     front
  63.     surface     back
  64.     surface     trkTemp         mask=0x004
  65.     surface     switch1
  66.     surface     switch4
  67.     surface     switch5
  68.     surface     trig_Attach     mask=0x004
  69.     
  70.     template    tplComCar=mine_2commcar     local
  71.     template    bomb=ghost                  local
  72.     template    debris0=woodshrapa_nc       local
  73.     template    debris1=woodshrapb_nc       local
  74.     template    debris2=woodshrapc_nc       local
  75.     template    tplExp=+bazooka_exp         local
  76.     template    tplActor=indy_sh_actor      local
  77.     template    tplLevPull=pullever         local
  78.     
  79.     keyframe    leverPull=gen_lever_pull.key        local
  80.     keyframe    indyPull=in_pull_lever.key          local
  81.     keyframe    com_die=mc_die.key                  local
  82.     
  83.     cog         lever4
  84.     cog         lever5
  85.     cog         ambush
  86.     cog         mineDoors
  87.     cog         panelSay
  88.     cog         hintCog
  89.     
  90.     sound       comFalling=Sl06a01.wav                  local   # arrr...
  91.     sound       sfxBreak=sol_break_aframe_c.wav         local   # break a-frame
  92.     sound       sfxCrash=sol_break_barricade_c.wav      local   # break barricade
  93.     sound       sfxExplode=gen_grenade_explode.wav      local   # temp explosion
  94.     sound       inDidnt=Inxj092.wav                     local   # that didn't...
  95.     sound       inBeSafe=Sl06j02.wav                    local   # better throw...
  96.     sound       inNope=Inxj088.wav                      local   # nope
  97.     sound       sndSwitchTex=sol_panel_switch_c.wav     local   # click
  98.     sound       inDangerous=Inxj056.wav                 local   # that looks dangerous
  99.     sound       sndLever=gen_lever_pull.wav             local   # lever sound
  100.     sound       inWontWork=Inxj058.wav                  local   # that won't work
  101.     sound       inBetterNot=Inxj260a.wav                local   # I better not do that
  102.     
  103.     int         curCam                  local
  104.     int         fragment                local
  105.     int         i                       local
  106.     int         ready=0                 local
  107.     int         notQuite=0              local
  108.     int         playing=0               local
  109.     int         done=0                  local
  110.     int         frontShot=0             local
  111.     
  112.     # ** subroutines **
  113.     flex        throwback       local
  114.     flex        pullit          local
  115.     flex        wontWork        local
  116.     flex        betterNot       local
  117.     flex        barricade       local
  118.     
  119. end
  120.  
  121. # ========================================================================================
  122.  
  123. code
  124.  
  125. startup:
  126.  
  127.     # set all globals to zero at level start
  128.     global0 = 0;
  129.     global1 = 0;
  130.     global2 = 0;
  131.     global3 = 0;
  132.     
  133.     # Make air in com falls no move track
  134.     SetSurfaceFlags(trkTemp, 0x4000);
  135.     ClearAdjoinFlags(trkTemp, 2);
  136.     
  137.     return;
  138.     
  139. # ========================================================================================
  140.  
  141. user0:
  142.  
  143.     # switches 1, 4, and 5 are all correct
  144.     if((GetWallCel(switch1) == 2) && (GetWallCel(switch4) == 2) && (GetWallCel(switch5) == 1))
  145.     {
  146.         ready = 1;
  147.         SetTimer(0.5);
  148.     }
  149.         
  150.     # switches 1 and 4 are correct, switch5 is not
  151.     if((GetWallCel(switch1) == 2) && (GetWallCel(switch4) == 2) && (GetWallCel(switch5) == 2))
  152.     {
  153.         notQuite = 1;
  154.         SetTimer(0.5);
  155.     }
  156.         
  157.     # switch1 is not correct
  158.     if(GetWallCel(switch1) == 1)
  159.     {
  160.         return;
  161.     }
  162.     
  163.     return;
  164.         
  165. # ========================================================================================
  166.  
  167. user1:
  168.  
  169.     frontShot = 1;
  170.     return;
  171.  
  172. # ========================================================================================
  173.  
  174. user2:
  175.  
  176.     frontShot = 0;
  177.     return;
  178.  
  179. # ========================================================================================
  180.  
  181. entered:
  182.  
  183.     player = GetLocalPlayerThing();
  184.  
  185. # ****************************************************
  186. # all switches are in synch send commies over the edge
  187. # ****************************************************
  188.     if((ready == 1) && (done == 0)  && (GetSourceRef() == comCar))
  189.     {
  190.         if(GetSenderRef() == trig1)
  191.         {
  192.             # Cut to comCam2
  193.             SetCameraFocus(2, comCam2);
  194.             SetCameraSecondaryFocus(2, comCar);
  195.             SetCurrentCamera(2);
  196.             SetCameraFOV(40, 0, 0.0);
  197.             SetCameraFOV(90, 1, 1.0);
  198.         }
  199.             
  200.         else if(GetSenderRef() == trig2)
  201.         {
  202.             # Cut to comCam3
  203.             SetCameraFocus(2, comCam3);
  204.             SetCameraSecondaryFocus(2, comCar);
  205.             SetCurrentCamera(2);
  206.             SetCameraFOV(90, 0, 0.0);
  207.         }
  208.             
  209.         else if(GetSenderRef() == trig3)
  210.         {
  211.             # Cut to comCam4 with focus on ghost_Focus
  212.             SetCameraFocus(2, comCam4);
  213.             SetCameraSecondaryFocus(2, ghost_Focus);
  214.             SetCurrentCamera(2);
  215.             SetCameraFOV(90, 0, 0.0);
  216.         }
  217.         
  218.         else if(GetSenderRef() == trig_Attach)
  219.         {
  220.             # attach ghost_Focus to comCar
  221.             AttachThingToThing(ghost_Focus, comCar);
  222.         }
  223.             
  224.         else if(GetSenderRef() == trig4)
  225.         {
  226.             # Cut to comCam5
  227.             SetCameraFocus(2, comCam5);
  228.             SetCameraSecondaryFocus(2, aframe1);
  229.             SetCurrentCamera(2);
  230.             SetCameraFOV(90, 0, 0.0);
  231.             
  232.             # detach ghost_Focus from comCar
  233.             DetachThing(ghost_Focus);
  234.         }
  235.             
  236.         else if(GetSenderRef() == aframeTrig)
  237.         {
  238.             # bust thru A-frame
  239.             SetCollideType(aframe0, 0);
  240.             SetCollideType(aframe1, 0);
  241.             PlaySoundLocal(sfxBreak, 1.0, 0.0, 0x0, 0);
  242.             
  243.             # create A-fram debris
  244.             for(i=0; i<10; i=i+1)                                                                        
  245.             {
  246.                 fragment = CreateThing(debris0[RandBetween(0, 2)], aframe0);                                 
  247.                 SetThingVel(fragment, VectorScale(VectorAdd(RandVec(), '-0.5 -0.1 0.0'), 2));
  248.                 SetThingRotVel(fragment, VectorScale(VectorAdd(RandVec(), '0.0 0.0 0.0'), 900.0));                    
  249.             }
  250.                 
  251.             # rotate A-frams out of the way
  252.             Rotate(aframe0, -75, 0, 0.25);
  253.             Rotate(aframe1, 75, 0, 0.25);
  254.             
  255.             # reset collide
  256.             WaitForStop(aframe0);
  257.             SetCollideType(aframe0, 3);
  258.             SetCollideType(aframe1, 3);
  259.         }
  260.             
  261.         else if(GetSenderRef() == trig5)
  262.         {
  263.             # Cut to comCam6
  264.             SetCameraFocus(2, comCam6);
  265.             SetCameraSecondaryFocus(2, comCar);
  266.             SetCurrentCamera(2);
  267.             SetCameraFOV(20, 0, 0.0);
  268.             SetCameraFOV(90, 1, 2.0);
  269.         }   
  270.             
  271.         else if(GetSenderRef() == breakTrig)
  272.         {
  273.             # break out the boards
  274.             SetWallCel(front, 1);
  275.             SetWallCel(back, 1);
  276.             SetAdjoinFlags(front, 2);
  277.             setadjoinflags(back, 2);
  278.             
  279.             PlaySoundLocal(sfxCrash, 1.0, 0.0, 0x0, 0);
  280.             bombpos = CreateThingAtPos(bomb, GetSurfaceSector(back), GetSurfaceCenter(back), VectorSet(0, 0, 0));
  281.             
  282.             for(i=0; i<40; i=i+1)                                                                        
  283.             {
  284.                 fragment = CreateThing(debris0[RandBetween(0, 2)], bombpos);                                 
  285.                 SetThingVel(fragment, VectorScale(VectorAdd(RandVec(), '-0.5 -0.1 0.0'), 2));
  286.                 SetThingRotVel(fragment, VectorScale(VectorAdd(RandVec(), '0.0 0.0 0.0'), 900.0));                    
  287.             }
  288.             
  289.             # play com die key
  290.             PlayKey(comCar, com_die, 4, 0x0, 0);
  291.         }
  292.                 
  293.         else if(GetSenderRef() == trkTemp)
  294.         {
  295.             # zoom camera back
  296.             SetCameraFOV(120, 1, 2.0);
  297.             Sleep(0.1);
  298.             
  299.             # pull track out from under comCar
  300.             ClearSurfaceFlags(trkTemp, 0x4000);
  301.             SetAdjoinFlags(trkTemp, 2);
  302.             DetachThing(comCar);
  303.             
  304.             # nose her in
  305.             SetThingRotVel(comCar, '-90.0 0.0 0.0');
  306.             
  307.             # make commies scream!
  308.             PlaySoundLocal(comFalling, 1.0, 0.0, 0x0, 0);
  309.             Sleep(0.8);
  310.             
  311.             # create explosion and sfx
  312.             PlaySoundLocal(sfxExplode, 1.0, 0.0, 0x0, 0);
  313.             PlaySoundLocal(sfxBreak, 1.0, 0.0, 0x0, 0);
  314.             CreateThing(tplExp, ghostExp);
  315.             CreateThing(tplExp, comCar);
  316.             SetThingLight(ghostExp, '1.0 0.75 0.75', 5.0, 0.1);
  317.             
  318.             # hide comCar
  319.             SetThingFlags(comCar, 0x10);
  320.             StopAllSoundsThing(comCar);
  321.             
  322.             Sleep(1.0);
  323.             
  324.             # fade out light
  325.             SetThingLight(ghostExp, '0.0 0.0 0.0', 0.0, 0.25);
  326.             
  327.             Sleep(1.0); #1.5
  328.             
  329.             # throw switch back
  330.             Call throwBack;
  331.             
  332.             # tell sol_ambush.cog that secondLap = 1
  333.             SendMessage(ambush, user0);
  334.             
  335.             # tell panelSay.cog not to talk
  336.             SendMessage(panelSay, user1);
  337.             
  338.             # solve hint17
  339.             SendMessage(hintCog, user0);
  340.             
  341.             # turn basic ambients back on
  342.             global4 = 0;
  343.             
  344.             ready = 0;
  345.             done = 1;
  346.         }
  347.     }
  348.         
  349. # *****************************************
  350. # Switch 5 is in wrong position, do partial
  351. # *****************************************
  352.     if( (notQuite == 1) && (GetSourceRef() == comCar))
  353.     {
  354.         if(GetSenderRef() == trig1)
  355.         {
  356.             # do cutscene stuff
  357.             MakeMeStop();
  358.             StartCutscene(0);
  359.             
  360.             # Cut to comCam2
  361.             SetCameraFocus(2, comCam2);
  362.             SetCameraSecondaryFocus(2, comCar);
  363.             SetCurrentCamera(2);
  364.             SetCameraFOV(30, 0, 0.0);
  365.             SetCameraFOV(90, 1, 2.0);
  366.         }
  367.             
  368.         if(GetSenderRef() == trig6)
  369.         {
  370.             Sleep(1.0);
  371.             DestroyThing(comCar);
  372.             
  373.             # reset cam to ctrlroom
  374.             SetCameraFocus(2, offsetCam);
  375.             SetCameraSecondaryFocus(2, player);
  376.             SetCurrentCamera(2);
  377.             SetCameraFOV(90, 0, 0.0);
  378.             Sleep(0.5);
  379.             
  380.             # play voice line
  381.             PlayVoice(player, inDidnt, 1.0, 1);
  382.             
  383.             # restore controls and camera
  384.             ClearActorFlags(player, 0x200000);
  385.             SetCurrentCamera(1);
  386.             
  387.             # restore player controls
  388.             ClearActorFlags(player, 0x200000);
  389.             
  390.             EndCutscene();
  391.         }
  392.     }
  393.         
  394.     return;
  395.  
  396. # ========================================================================================
  397.  
  398. activated:
  399.  
  400.     player = GetLocalPlayerThing();
  401.     curCam = GetCurrentCamera();
  402.     
  403.     # lever 5 control
  404.     if((GetSenderRef() == pushed) && (ready == 0) && (playing == 0))
  405.     {
  406.         # player tries to use oil on lever -- duh
  407.         if(GetCurItem(player) == 81)
  408.         {
  409.             Call wontWork;
  410.         }
  411.         
  412.         # player can't throw switch5 any more
  413.         else
  414.         {
  415.             Call betterNot;
  416.         }
  417.     }
  418.     
  419.     # player activates the front side of the barricade
  420.     else if((GetSenderRef() == front) && (playing == 0))
  421.     {
  422.         playing = 1;
  423.         Call barricade;
  424.     }
  425.             
  426.     return;
  427.  
  428. # ========================================================================================
  429.  
  430. throwback:
  431.     
  432.     player = GetLocalPlayerThing();
  433.     
  434.     # destroy comCar
  435.     DestroyThing(comCar);
  436.     
  437.     # destroy old lever
  438.     SendMessage(lever5, user1);
  439.     
  440.     # create new lever in this cog     
  441.     pushed = CreateThing(tplLevPull, leverGhost);
  442.     CaptureThing(pushed);
  443.     
  444.     # if player was standing at lever1 when 
  445.     # commies were sent over the edge, do this.
  446.     if(global0 == 1)
  447.     {
  448.         # do cutscene stuff
  449.         MakeMeStop();
  450.         
  451.         # create indy1 actor
  452.         indy1 = CreateThing(tplActor, player);
  453.         CaptureThing(indy1);
  454.         Sleep(0.01);
  455.         
  456.         # outfit indy actors
  457.         CopyPlayerHolsters(player, indy1);
  458.         CopyPlayerHolsters(player, indy2);
  459.         
  460.         # get indy1 ready for cutscene
  461.         AISetCutsceneMode(indy1);
  462.         
  463.         # hide player show actor
  464.         SetThingFlags(player, 0x80000);
  465.         ClearThingFlags(indy1, 0x80000);
  466.         Sleep(0.5);
  467.  
  468.         # Cut to indyCam1 in control room
  469.         SetCameraFocus(2, indyCam1);
  470.         SetCameraSecondaryFocus(2, indy1);
  471.         SetCurrentCamera(2);
  472.         SetCameraFOV(90, 0, 0.0);
  473.         
  474.         # Walk indy1 to lever 5
  475.         AISetMoveSpeed(indy1, 1.2);
  476.         AISetLookThing(indy1, target1);
  477.         AISetMoveThing(indy1, target1, 1);
  478.         
  479.         # hide indy1 show indy2
  480.         SetThingFlags(indy1, 0x80000);
  481.         ClearThingFlags(indy2, 0x80000);
  482.         
  483.         # cut to indyCam2
  484.         SetCameraFocus(2, indyCam2);
  485.         SetCameraSecondaryFocus(2, indy2);
  486.         SetCurrentCamera(2);
  487.         SetCameraFOV(90, 0, 0.0);
  488.         Sleep(0.5);
  489.         
  490.         # play voice line
  491.         PlayVoice(indy2, inBeSafe, 1.0, 1);
  492.         
  493.         # pull the lever
  494.         Call pullit;
  495.     }
  496.         
  497.     # if player was standing at lever4 when 
  498.     # commies were sent over the edge, do this.
  499.     if(global1 == 1)
  500.     {
  501.         # do cutscene stuff
  502.         MakeMeStop();
  503.         
  504.         # create indy1 actor
  505.         indy1 = CreateThing(tplActor, player);
  506.         CaptureThing(indy1);
  507.         Sleep(0.01);
  508.         
  509.         # outfit indy actors
  510.         CopyPlayerHolsters(player, indy1);
  511.         CopyPlayerHolsters(player, indy2);
  512.         
  513.         # get indy1 ready for cutscene
  514.         AISetCutsceneMode(indy1);
  515.         
  516.         # hide player show actor
  517.         SetThingFlags(player, 0x80000);
  518.         ClearThingFlags(indy1, 0x80000);
  519.         Sleep(0.5);
  520.         
  521.         # Cut to indyCam2
  522.         SetCameraFocus(2, indyCam2);
  523.         SetCameraSecondaryFocus(2, indy1);
  524.         SetCurrentCamera(2);
  525.         SetCameraFOV(90, 0, 0.0);
  526.         
  527.         # Walk Indy to lever 5
  528.         AISetMoveSpeed(indy1, 1.2);
  529.         AISetLookThing(indy1, target1);
  530.         Sleep(0.5);
  531.         AISetMoveThing(indy1, target1, 1);
  532.         AISetLookThing(indy1, pushed);
  533.         Sleep(0.5);
  534.         
  535.         # play voice line
  536.         PlayVoice(indy1, inBeSafe, 1.0, 1);
  537.         
  538.         # hide indy1 show indy2
  539.         SetThingFlags(indy1, 0x80000);
  540.         ClearThingFlags(indy2, 0x80000);
  541.         
  542.         # Cut to indyCam3
  543.         SetCameraFocus(2, indyCam3);
  544.         SetCameraSecondaryFocus(2, indy2);
  545.         SetCurrentCamera(2);
  546.         SetCameraFOV(90, 0, 0.0);
  547.         
  548.         # pull the lever
  549.         Call pullit;
  550.     }
  551.         
  552.     # if player was standing at lever5 when 
  553.     # commies were sent over the edge, do this.
  554.     if(global2 == 1)
  555.     {
  556.         # do cutscene stuff
  557.         MakeMeStop();
  558.         
  559.         # outfit indy actor
  560.         CopyPlayerHolsters(player, indy2);
  561.         
  562.         # hide player show actor
  563.         SetThingFlags(player, 0x80000);
  564.         ClearThingFlags(indy2, 0x80000);
  565.         Sleep(0.5);
  566.         
  567.         # Cut to indyCam2
  568.         SetCameraFocus(2, indyCam2);
  569.         SetCameraSecondaryFocus(2, indy2);
  570.         SetCurrentCamera(2);
  571.         SetCameraFOV(90, 0, 0.0);
  572.         Sleep(0.5);
  573.         
  574.         # play voice line
  575.         PlayVoice(indy2, inBeSafe, 1.0, 1);
  576.         
  577.         # pull the lever
  578.         Call pullit;
  579.     }   
  580.         
  581.     return;
  582.         
  583. # ========================================================================================
  584.  
  585. pullit:
  586.  
  587.     player = GetLocalPlayerThing();
  588.     
  589.     # pull the lever
  590.     PlayKey(pushed, leverPull, 4, 0x14, 0);
  591.     PlayKey(indy2, indyPull, 4, 0x12, 0);
  592.     Sleep(0.75);
  593.     PlaySoundLocal(sndLever, 1.0, 0.0, 0x0, 1);
  594.     
  595.     # Cut to Control Panel cam
  596.     SetCameraFocus(2, ctrlCam1);
  597.     SetCameraSecondaryFocus(2, panelTarget);
  598.     SetCurrentCamera(2);
  599.     SetCameraFOV(90, 0, 0.0);
  600.     Sleep(0.5);
  601.     
  602.     # flip panel switch
  603.     SetWallCel(switch5, 2);
  604.     PlaySoundLocal(sndSwitchTex, 1.0, 0.0, 0x0, 1);
  605.     Sleep(0.5);
  606.     
  607.     # Cut to switch cam
  608.     SetCameraFocus(2, switchCam);
  609.     SetCameraSecondaryFocus(2, trkSwitch5); 
  610.     SetCurrentCamera(2);
  611.     SetCameraFOV(90, 0, 0.0);
  612.     
  613.     # rotate track switch
  614.     Rotate(trkSwitch5, -90, 1, 1.0);
  615.     Sleep(2.0);
  616.     
  617.     # get player into positon
  618.     CopyOrientAndPos(indy2, player);
  619.     
  620.     # hide actor show player
  621.     SetThingFlags(indy2, 0x80000);
  622.     ClearThingFlags(player, 0x80000);
  623.     
  624.     # restore player controls
  625.     ClearActorFlags(player, 0x200000);
  626.     
  627.     # return camera to player
  628.     SetCurrentCamera(1);
  629.     
  630.     EndCutscene();
  631.     
  632.     return;    
  633.  
  634. # ========================================================================================
  635.  
  636. wontWork:
  637.  
  638.     player = GetLocalPlayerThing();
  639.     curCam = GetCurrentCamera();
  640.  
  641.     playing = 1;
  642.     
  643.     # do cutscene stuff
  644.     MakeMeStop();
  645.     StartCutscene(0);
  646.     
  647.     # switch to offsetCam
  648.     SetCameraFocus(2, offsetCam);
  649.     SetCameraSecondaryFocus(2, player);
  650.     SetCurrentCamera(2);
  651.     SetCameraFOV(90, 0, 0.0);
  652.     
  653.     # put away any weapon
  654.     DeselectWeaponWait(player);
  655.     
  656.     # activate lever
  657.     PlayMode(player, 60, 0);
  658.     Sleep(0.3);
  659.     
  660.     # play voice line
  661.     PlayVoice(player, inWontWork, 1.0, 1);
  662.     
  663.     # restore controls and camera
  664.     ClearActorFlags(player, 0x200000);
  665.     SetCurrentCamera(curCam);
  666.     
  667.     EndCutscene();
  668.     playing = 0;
  669.  
  670.     return;
  671.     
  672. # ========================================================================================
  673.  
  674. betterNot:
  675.  
  676.     player = GetLocalPlayerThing();
  677.     curCam = GetCurrentCamera();
  678.  
  679.     playing = 1;
  680.     
  681.     # do cutscene stuff
  682.     MakeMeStop();
  683.     StartCutscene(0);
  684.     
  685.     # switch to offsetCam
  686.     SetCameraFocus(2, offsetCam);
  687.     SetCameraSecondaryFocus(2, player);
  688.     SetCurrentCamera(2);
  689.     SetCameraFOV(90, 0, 0.0);
  690.     
  691.     # put away any weapon
  692.     DeselectWeaponWait(player);
  693.     
  694.     # activate lever
  695.     PlayMode(player, 60, 0);
  696.     Sleep(0.3);
  697.     
  698.     # play voice line
  699.     PlayVoice(player, inBetterNot, 1.0, 1);
  700.     
  701.     # restore controls and camera
  702.     ClearActorFlags(player, 0x200000);
  703.     SetCurrentCamera(curCam);
  704.     
  705.     EndCutscene();
  706.     playing = 0;
  707.     
  708.     return;
  709.     
  710. # ========================================================================================
  711.  
  712. barricade:
  713.  
  714.     player = GetLocalPlayerThing();
  715.  
  716.     # play voice line
  717.     PlayVoice(player, inDangerous, 1.0, 1);
  718.     playing = 0;
  719.  
  720.     return;
  721.     
  722. # ========================================================================================
  723.  
  724. timer:
  725.     
  726.     # create comcar and disable player controls
  727.     #StartCutscene(1);   # make hud go away
  728.     #SetActorFlags(player, 0x200000);
  729.     
  730.     # create comCar
  731.     comCar = CreateThing(tplComCar, GhostCar);
  732.     CaptureThing(comCar);
  733.     
  734.     if(frontShot == 1)
  735.     {
  736.         # Cut to cam_FrontShot
  737.         SetCameraFocus(2, cam_FrontShot);
  738.         SetCameraSecondaryFocus(2, trkSwitch4);
  739.         SetCurrentCamera(2);
  740.         SetCameraFOV(90, 0, 0.0);
  741.     }
  742.     
  743.     else
  744.     {
  745.         # Cut to comCam1
  746.         SetCameraFocus(2, comCam1);
  747.         SetCameraSecondaryFocus(2, trkSwitch4);
  748.         SetCurrentCamera(2);
  749.         SetCameraFOV(90, 0, 0.0);
  750.     }
  751.     
  752.     # tell ctrlLever4 to rotate switch4
  753.     if(frontShot == 0) SendMessage(lever4, user1);
  754.     
  755.     Sleep(2.0);
  756.     
  757.     # open the doors and keep them open
  758.     SendMessage(mineDoors, user0);
  759.     
  760.     # give comcar some thrust
  761.     SetThingThrust(comCar, '0.0 4.0 0.0');
  762.     
  763.     return;
  764.  
  765. # ========================================================================================
  766.  
  767. end
  768.  
  769.